package com.wnxy.sk.product.api;

import com.wnxy.sk.common.result.Result;
import com.wnxy.sk.product.api.dto.OrderDto;
import com.wnxy.sk.product.api.dto.OrderVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "sk-order-service")
public interface OrderApi {
    @PostMapping("/auth/order")
    Result createOrder(@RequestBody OrderDto orderDto);

    // 根据订单编号查询
    @GetMapping("/auth/order/{orderSn}")
    Result<OrderVo> getOrderBySn(@PathVariable("orderSn") String orderSn);

    // 根据订单编号修改状态
    @PutMapping("/auth/order/{orderSn}")
    Result update(@PathVariable("orderSn") String orderSn);
}
